<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Aether.Physics2D: PolygonShape Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="NugetLogo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Aether.Physics2D
   &#160;<span id="projectnumber">2.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_polygon_shape.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#properties">Properties</a> &#124;
<a href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_polygon_shape-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">PolygonShape Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Represents a simple non-selfintersecting convex polygon. Create a convex hull from the given array of points.  
 <a href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_polygon_shape.html#details">More...</a></p>
<div class="dynheader">
Inheritance diagram for PolygonShape:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_polygon_shape__inherit__graph.svg" width="135" height="118"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
<div class="dynheader">
Collaboration diagram for PolygonShape:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_polygon_shape__coll__graph.svg" width="151" height="214"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ac9ea90f249ba9bd7d0ecce4b55553a46"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_polygon_shape.html#ac9ea90f249ba9bd7d0ecce4b55553a46">PolygonShape</a> (<a class="el" href="classnkast_1_1_aether_1_1_physics2_d_1_1_common_1_1_vertices.html">Vertices</a> vertices, float density)</td></tr>
<tr class="memdesc:ac9ea90f249ba9bd7d0ecce4b55553a46"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes a new instance of the <a class="el" href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_polygon_shape.html" title="Represents a simple non-selfintersecting convex polygon. Create a convex hull from the given array of...">PolygonShape</a> class.  <a href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_polygon_shape.html#ac9ea90f249ba9bd7d0ecce4b55553a46">More...</a><br /></td></tr>
<tr class="separator:ac9ea90f249ba9bd7d0ecce4b55553a46"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a38f89abd2ae9cbb5c8c1304bb6d6ee85"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_polygon_shape.html#a38f89abd2ae9cbb5c8c1304bb6d6ee85">PolygonShape</a> (float density)</td></tr>
<tr class="memdesc:a38f89abd2ae9cbb5c8c1304bb6d6ee85"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new <a class="el" href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_polygon_shape.html" title="Represents a simple non-selfintersecting convex polygon. Create a convex hull from the given array of...">PolygonShape</a> with the specified density.  <a href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_polygon_shape.html#a38f89abd2ae9cbb5c8c1304bb6d6ee85">More...</a><br /></td></tr>
<tr class="separator:a38f89abd2ae9cbb5c8c1304bb6d6ee85"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a45938b77fd55a99a6996f4d9b30a9355"><td class="memItemLeft" align="right" valign="top">override bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_polygon_shape.html#a45938b77fd55a99a6996f4d9b30a9355">TestPoint</a> (ref <a class="el" href="structnkast_1_1_aether_1_1_physics2_d_1_1_common_1_1_transform.html">Transform</a> transform, ref <a class="el" href="structnkast_1_1_aether_1_1_physics2_d_1_1_common_1_1_vector2.html">Vector2</a> point)</td></tr>
<tr class="memdesc:a45938b77fd55a99a6996f4d9b30a9355"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test a point for containment in this shape. Note: This only works for convex shapes.  <a href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_polygon_shape.html#a45938b77fd55a99a6996f4d9b30a9355">More...</a><br /></td></tr>
<tr class="separator:a45938b77fd55a99a6996f4d9b30a9355"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2778225f703af6be7c0e1c5071043f28"><td class="memItemLeft" align="right" valign="top">override bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_polygon_shape.html#a2778225f703af6be7c0e1c5071043f28">RayCast</a> (out <a class="el" href="structnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_ray_cast_output.html">RayCastOutput</a> output, ref <a class="el" href="structnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_ray_cast_input.html">RayCastInput</a> input, ref <a class="el" href="structnkast_1_1_aether_1_1_physics2_d_1_1_common_1_1_transform.html">Transform</a> transform, int childIndex)</td></tr>
<tr class="memdesc:a2778225f703af6be7c0e1c5071043f28"><td class="mdescLeft">&#160;</td><td class="mdescRight">Cast a ray against a child shape.  <a href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_polygon_shape.html#a2778225f703af6be7c0e1c5071043f28">More...</a><br /></td></tr>
<tr class="separator:a2778225f703af6be7c0e1c5071043f28"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a93713547c5cf73e00d9777ee7c473704"><td class="memItemLeft" align="right" valign="top">override void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_polygon_shape.html#a93713547c5cf73e00d9777ee7c473704">ComputeAABB</a> (out <a class="el" href="structnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_a_a_b_b.html">AABB</a> aabb, ref <a class="el" href="structnkast_1_1_aether_1_1_physics2_d_1_1_common_1_1_transform.html">Transform</a> transform, int childIndex)</td></tr>
<tr class="memdesc:a93713547c5cf73e00d9777ee7c473704"><td class="mdescLeft">&#160;</td><td class="mdescRight">Given a transform, compute the associated axis aligned bounding box for a child shape.  <a href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_polygon_shape.html#a93713547c5cf73e00d9777ee7c473704">More...</a><br /></td></tr>
<tr class="separator:a93713547c5cf73e00d9777ee7c473704"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a48aca4b2ada41bbc2cb55778a28116a4"><td class="memItemLeft" align="right" valign="top">override float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_polygon_shape.html#a48aca4b2ada41bbc2cb55778a28116a4">ComputeSubmergedArea</a> (ref <a class="el" href="structnkast_1_1_aether_1_1_physics2_d_1_1_common_1_1_vector2.html">Vector2</a> normal, float offset, ref <a class="el" href="structnkast_1_1_aether_1_1_physics2_d_1_1_common_1_1_transform.html">Transform</a> xf, out <a class="el" href="structnkast_1_1_aether_1_1_physics2_d_1_1_common_1_1_vector2.html">Vector2</a> sc)</td></tr>
<tr class="memdesc:a48aca4b2ada41bbc2cb55778a28116a4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Used for the buoyancy controller  <a href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_polygon_shape.html#a48aca4b2ada41bbc2cb55778a28116a4">More...</a><br /></td></tr>
<tr class="separator:a48aca4b2ada41bbc2cb55778a28116a4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a811aa4a64a4882cd167940613d723e93"><td class="memItemLeft" align="right" valign="top"><a id="a811aa4a64a4882cd167940613d723e93"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>CompareTo</b> (<a class="el" href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_polygon_shape.html">PolygonShape</a> shape)</td></tr>
<tr class="separator:a811aa4a64a4882cd167940613d723e93"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a220de7924230483aa0f27bda169091ef"><td class="memItemLeft" align="right" valign="top">override <a class="el" href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape.html">Shape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_polygon_shape.html#a220de7924230483aa0f27bda169091ef">Clone</a> ()</td></tr>
<tr class="memdesc:a220de7924230483aa0f27bda169091ef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clone the concrete shape  <a href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_polygon_shape.html#a220de7924230483aa0f27bda169091ef">More...</a><br /></td></tr>
<tr class="separator:a220de7924230483aa0f27bda169091ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a093930f367fdfbf31ef7e56449cbaef8"><td class="memItemLeft" align="right" valign="top">override void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_polygon_shape.html#a093930f367fdfbf31ef7e56449cbaef8">ComputeProperties</a> ()</td></tr>
<tr class="memdesc:a093930f367fdfbf31ef7e56449cbaef8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the mass properties of this shape using its dimensions and density. The inertia tensor is computed about the local origin, not the centroid.  <a href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_polygon_shape.html#a093930f367fdfbf31ef7e56449cbaef8">More...</a><br /></td></tr>
<tr class="separator:a093930f367fdfbf31ef7e56449cbaef8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_methods_classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape')"><img src="closed.png" alt="-"/>&#160;Protected Member Functions inherited from <a class="el" href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape.html">Shape</a></td></tr>
<tr class="memitem:a197ede34ea1afc5846714a6ff404d5bc inherit pro_methods_classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape"><td class="memItemLeft" align="right" valign="top"><a id="a197ede34ea1afc5846714a6ff404d5bc"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>Shape</b> (float density)</td></tr>
<tr class="separator:a197ede34ea1afc5846714a6ff404d5bc inherit pro_methods_classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="properties"></a>
Properties</h2></td></tr>
<tr class="memitem:a53939aa9619530fcdd1bc2c2de9d237e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnkast_1_1_aether_1_1_physics2_d_1_1_common_1_1_vertices.html">Vertices</a>?&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_polygon_shape.html#a53939aa9619530fcdd1bc2c2de9d237e">Vertices</a><code> [get, set]</code></td></tr>
<tr class="memdesc:a53939aa9619530fcdd1bc2c2de9d237e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a convex hull from the given array of local points. The number of vertices must be in the range [3, Settings.MaxPolygonVertices]. Warning: the points may be re-ordered, even if they form a convex polygon Warning: collinear points are handled but not removed. Collinear points may lead to poor stacking behavior.  <a href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_polygon_shape.html#a53939aa9619530fcdd1bc2c2de9d237e">More...</a><br /></td></tr>
<tr class="separator:a53939aa9619530fcdd1bc2c2de9d237e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a30b6cd752bacf9f3a37d89fe7115aa05"><td class="memItemLeft" align="right" valign="top"><a id="a30b6cd752bacf9f3a37d89fe7115aa05"></a>
<a class="el" href="classnkast_1_1_aether_1_1_physics2_d_1_1_common_1_1_vertices.html">Vertices</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Normals</b><code> [get]</code></td></tr>
<tr class="separator:a30b6cd752bacf9f3a37d89fe7115aa05"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acfad9c8f6c9c6bb4af7e6d895b7db6ab"><td class="memItemLeft" align="right" valign="top"><a id="acfad9c8f6c9c6bb4af7e6d895b7db6ab"></a>
override int&#160;</td><td class="memItemRight" valign="bottom"><b>ChildCount</b><code> [get]</code></td></tr>
<tr class="separator:acfad9c8f6c9c6bb4af7e6d895b7db6ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header properties_classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape"><td colspan="2" onclick="javascript:toggleInherit('properties_classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape')"><img src="closed.png" alt="-"/>&#160;Properties inherited from <a class="el" href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape.html">Shape</a></td></tr>
<tr class="memitem:ae865cf87c2deb408bb751ac4edec48e3 inherit properties_classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape"><td class="memItemLeft" align="right" valign="top">ShapeType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape.html#ae865cf87c2deb408bb751ac4edec48e3">ShapeType</a><code> [get, set]</code></td></tr>
<tr class="memdesc:ae865cf87c2deb408bb751ac4edec48e3 inherit properties_classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the type of this shape.  <a href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape.html#ae865cf87c2deb408bb751ac4edec48e3">More...</a><br /></td></tr>
<tr class="separator:ae865cf87c2deb408bb751ac4edec48e3 inherit properties_classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a198166e06737d60718fe5b2928ed2b1f inherit properties_classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape"><td class="memItemLeft" align="right" valign="top">abstract int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape.html#a198166e06737d60718fe5b2928ed2b1f">ChildCount</a><code> [get]</code></td></tr>
<tr class="memdesc:a198166e06737d60718fe5b2928ed2b1f inherit properties_classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number of child primitives.  <a href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape.html#a198166e06737d60718fe5b2928ed2b1f">More...</a><br /></td></tr>
<tr class="separator:a198166e06737d60718fe5b2928ed2b1f inherit properties_classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8d7187cabd35d4e479cecf7c7e3a9f00 inherit properties_classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape.html#a8d7187cabd35d4e479cecf7c7e3a9f00">Density</a><code> [get, set]</code></td></tr>
<tr class="memdesc:a8d7187cabd35d4e479cecf7c7e3a9f00 inherit properties_classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets or sets the density. Changing the density causes a recalculation of shape properties.  <a href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape.html#a8d7187cabd35d4e479cecf7c7e3a9f00">More...</a><br /></td></tr>
<tr class="separator:a8d7187cabd35d4e479cecf7c7e3a9f00 inherit properties_classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a062172106d8148f032b915309c6ff4e6 inherit properties_classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape.html#a062172106d8148f032b915309c6ff4e6">Radius</a><code> [get, set]</code></td></tr>
<tr class="memdesc:a062172106d8148f032b915309c6ff4e6 inherit properties_classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape"><td class="mdescLeft">&#160;</td><td class="mdescRight">Radius of the <a class="el" href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape.html" title="A shape is used for collision detection. You can create a shape however you like. Shapes used for sim...">Shape</a> Changing the radius causes a recalculation of shape properties.  <a href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape.html#a062172106d8148f032b915309c6ff4e6">More...</a><br /></td></tr>
<tr class="separator:a062172106d8148f032b915309c6ff4e6 inherit properties_classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pub_attribs_classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape"><td colspan="2" onclick="javascript:toggleInherit('pub_attribs_classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape')"><img src="closed.png" alt="-"/>&#160;Public Attributes inherited from <a class="el" href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape.html">Shape</a></td></tr>
<tr class="memitem:a39c52aba3b10f231f31636915bf32eeb inherit pub_attribs_classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_mass_data.html">MassData</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape.html#a39c52aba3b10f231f31636915bf32eeb">MassData</a></td></tr>
<tr class="memdesc:a39c52aba3b10f231f31636915bf32eeb inherit pub_attribs_classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape"><td class="mdescLeft">&#160;</td><td class="mdescRight">Contains the properties of the shape such as:  <a href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape.html#a39c52aba3b10f231f31636915bf32eeb">More...</a><br /></td></tr>
<tr class="separator:a39c52aba3b10f231f31636915bf32eeb inherit pub_attribs_classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Represents a simple non-selfintersecting convex polygon. Create a convex hull from the given array of points. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="ac9ea90f249ba9bd7d0ecce4b55553a46"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac9ea90f249ba9bd7d0ecce4b55553a46">&#9670;&nbsp;</a></span>PolygonShape() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_polygon_shape.html">PolygonShape</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classnkast_1_1_aether_1_1_physics2_d_1_1_common_1_1_vertices.html">Vertices</a>&#160;</td>
          <td class="paramname"><em>vertices</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>density</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initializes a new instance of the <a class="el" href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_polygon_shape.html" title="Represents a simple non-selfintersecting convex polygon. Create a convex hull from the given array of...">PolygonShape</a> class. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">vertices</td><td>The vertices.</td></tr>
    <tr><td class="paramname">density</td><td>The density.</td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a38f89abd2ae9cbb5c8c1304bb6d6ee85"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a38f89abd2ae9cbb5c8c1304bb6d6ee85">&#9670;&nbsp;</a></span>PolygonShape() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_polygon_shape.html">PolygonShape</a> </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>density</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a new <a class="el" href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_polygon_shape.html" title="Represents a simple non-selfintersecting convex polygon. Create a convex hull from the given array of...">PolygonShape</a> with the specified density. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">density</td><td>The density.</td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a220de7924230483aa0f27bda169091ef"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a220de7924230483aa0f27bda169091ef">&#9670;&nbsp;</a></span>Clone()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">override <a class="el" href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape.html">Shape</a> Clone </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Clone the concrete shape </p>
<dl class="section return"><dt>Returns</dt><dd>A clone of the shape</dd></dl>

<p>Implements <a class="el" href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape.html#a56dfbf74d858c85376fc6f62773d9625">Shape</a>.</p>

</div>
</div>
<a id="a93713547c5cf73e00d9777ee7c473704"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a93713547c5cf73e00d9777ee7c473704">&#9670;&nbsp;</a></span>ComputeAABB()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">override void ComputeAABB </td>
          <td>(</td>
          <td class="paramtype">out <a class="el" href="structnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_a_a_b_b.html">AABB</a>&#160;</td>
          <td class="paramname"><em>aabb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ref <a class="el" href="structnkast_1_1_aether_1_1_physics2_d_1_1_common_1_1_transform.html">Transform</a>&#160;</td>
          <td class="paramname"><em>transform</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>childIndex</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Given a transform, compute the associated axis aligned bounding box for a child shape. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">aabb</td><td>The aabb results.</td></tr>
    <tr><td class="paramname">transform</td><td>The world transform of the shape.</td></tr>
    <tr><td class="paramname">childIndex</td><td>The child shape index.</td></tr>
  </table>
  </dd>
</dl>

<p>Implements <a class="el" href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape.html#abaa4b975feb7324e02010f6229539bd4">Shape</a>.</p>

</div>
</div>
<a id="a093930f367fdfbf31ef7e56449cbaef8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a093930f367fdfbf31ef7e56449cbaef8">&#9670;&nbsp;</a></span>ComputeProperties()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">override void ComputeProperties </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Compute the mass properties of this shape using its dimensions and density. The inertia tensor is computed about the local origin, not the centroid. </p>

<p>Implements <a class="el" href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape.html#ae2750bf71e92108b3d60c4d2c65dc981">Shape</a>.</p>

</div>
</div>
<a id="a48aca4b2ada41bbc2cb55778a28116a4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a48aca4b2ada41bbc2cb55778a28116a4">&#9670;&nbsp;</a></span>ComputeSubmergedArea()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">override float ComputeSubmergedArea </td>
          <td>(</td>
          <td class="paramtype">ref <a class="el" href="structnkast_1_1_aether_1_1_physics2_d_1_1_common_1_1_vector2.html">Vector2</a>&#160;</td>
          <td class="paramname"><em>normal</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ref <a class="el" href="structnkast_1_1_aether_1_1_physics2_d_1_1_common_1_1_transform.html">Transform</a>&#160;</td>
          <td class="paramname"><em>xf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">out <a class="el" href="structnkast_1_1_aether_1_1_physics2_d_1_1_common_1_1_vector2.html">Vector2</a>&#160;</td>
          <td class="paramname"><em>sc</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Used for the buoyancy controller </p>

<p>Implements <a class="el" href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape.html#ae386cd71f9a6c7c0c232fa100373e391">Shape</a>.</p>

</div>
</div>
<a id="a2778225f703af6be7c0e1c5071043f28"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2778225f703af6be7c0e1c5071043f28">&#9670;&nbsp;</a></span>RayCast()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">override bool RayCast </td>
          <td>(</td>
          <td class="paramtype">out <a class="el" href="structnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_ray_cast_output.html">RayCastOutput</a>&#160;</td>
          <td class="paramname"><em>output</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ref <a class="el" href="structnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_ray_cast_input.html">RayCastInput</a>&#160;</td>
          <td class="paramname"><em>input</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ref <a class="el" href="structnkast_1_1_aether_1_1_physics2_d_1_1_common_1_1_transform.html">Transform</a>&#160;</td>
          <td class="paramname"><em>transform</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>childIndex</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Cast a ray against a child shape. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">output</td><td>The ray-cast results.</td></tr>
    <tr><td class="paramname">input</td><td>The ray-cast input parameters.</td></tr>
    <tr><td class="paramname">transform</td><td>The transform to be applied to the shape.</td></tr>
    <tr><td class="paramname">childIndex</td><td>The child shape index.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the ray-cast hits the shape</dd></dl>

<p>Implements <a class="el" href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape.html#a5b7e162e66dbc52fe2657ad895a50817">Shape</a>.</p>

</div>
</div>
<a id="a45938b77fd55a99a6996f4d9b30a9355"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a45938b77fd55a99a6996f4d9b30a9355">&#9670;&nbsp;</a></span>TestPoint()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">override bool TestPoint </td>
          <td>(</td>
          <td class="paramtype">ref <a class="el" href="structnkast_1_1_aether_1_1_physics2_d_1_1_common_1_1_transform.html">Transform</a>&#160;</td>
          <td class="paramname"><em>transform</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ref <a class="el" href="structnkast_1_1_aether_1_1_physics2_d_1_1_common_1_1_vector2.html">Vector2</a>&#160;</td>
          <td class="paramname"><em>point</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Test a point for containment in this shape. Note: This only works for convex shapes. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">transform</td><td>The shape world transform.</td></tr>
    <tr><td class="paramname">point</td><td>A point in world coordinates.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the point is inside the shape</dd></dl>

<p>Implements <a class="el" href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_shape.html#ac0cc1de8ed6c1dd1667134fc91477f8b">Shape</a>.</p>

</div>
</div>
<h2 class="groupheader">Property Documentation</h2>
<a id="a53939aa9619530fcdd1bc2c2de9d237e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a53939aa9619530fcdd1bc2c2de9d237e">&#9670;&nbsp;</a></span>Vertices</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classnkast_1_1_aether_1_1_physics2_d_1_1_common_1_1_vertices.html">Vertices</a>? <a class="el" href="classnkast_1_1_aether_1_1_physics2_d_1_1_common_1_1_vertices.html">Vertices</a></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span><span class="mlabel">set</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Create a convex hull from the given array of local points. The number of vertices must be in the range [3, Settings.MaxPolygonVertices]. Warning: the points may be re-ordered, even if they form a convex polygon Warning: collinear points are handled but not removed. Collinear points may lead to poor stacking behavior. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>Physics2D/Collision/Shapes/PolygonShape.cs</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacenkast.html">nkast</a></li><li class="navelem"><a class="el" href="namespacenkast_1_1_aether.html">Aether</a></li><li class="navelem"><a class="el" href="namespacenkast_1_1_aether_1_1_physics2_d.html">Physics2D</a></li><li class="navelem"><a class="el" href="namespacenkast_1_1_aether_1_1_physics2_d_1_1_collision.html">Collision</a></li><li class="navelem"><a class="el" href="namespacenkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes.html">Shapes</a></li><li class="navelem"><a class="el" href="classnkast_1_1_aether_1_1_physics2_d_1_1_collision_1_1_shapes_1_1_polygon_shape.html">PolygonShape</a></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
